package com.yihubang.navigationcourse.fragment

import android.os.Bundle
import android.view.View
import androidx.navigation.fragment.findNavController
import androidx.transition.TransitionInflater
import com.yihubang.navigationcourse.R
import com.yihubang.navigationcourse.base.BaseFragment
import kotlinx.android.synthetic.main.fragment_register.view.*

/*
 * class title: 
 * Author by RenChunLin, Email 18957806320@163.com, Date on 2021/4/23.
 * PS: Not easy to write code, please indicate.
 */
class RegisterFragment : BaseFragment() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        sharedElementEnterTransition = TransitionInflater.from(requireContext())
            .inflateTransition(R.transition.shared_image)
    }

    override fun getLayoutResId() = R.layout.fragment_register

    override fun initView(rootView: View) {
        rootView.toAvatarVerifyBtn.setOnClickListener {
            findNavController().navigate(R.id.avatar_verify_fragment)
        }

        val userName = arguments?.getString("userName")
        rootView.regUserNameInp.setText(userName)
    }
}